package com.demo.service;

import com.demo.dto.LoginFormDTO;
import com.demo.dto.PasswordLoginFormDTO;
import com.demo.dto.Result;
import com.demo.dto.UserDTO;
import com.demo.entity.User;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public interface LoginService {
    Result<Void> verifyCode(String phoneNum);

    Result<String> loginAndRegister(LoginFormDTO loginFormDTO);

    UserDTO setUserInfoToRedis(User user, String token);

    void imageCode(HttpServletResponse response, HttpSession session);

    Result<String> loginByPassword(PasswordLoginFormDTO loginFormDTO, HttpSession session);

    Result<String> registerByPassword(PasswordLoginFormDTO loginFormDTO, HttpSession session);
}
